home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _CAAF3EA739E64E3A8DFE29FE4C2EEB89 < prev    next >
Encoding:
Text File  |  2004-01-06  |  555 b   |  21 lines

  1.       #include "../CGVPMacro.csi"
  2.  
  3.       MainInput { uniform sampler2D baseMap : texunit0,
  4.                   uniform float4 Ambient }
  5.       DeclarationsScript
  6.       {
  7.         OUT_T0_C0
  8.         FOUT
  9.       }
  10.       CoreScript
  11.       {
  12.         // load the decal
  13.         float4 decalColor = tex2D(baseMap, IN.Tex0.xy);
  14.         float3 amb = decalColor.xyz * Ambient.xyz * IN.Color.xyz;
  15.  
  16.         // finally add them all together
  17.         OUT.Color.xyz = amb;                
  18.         OUT.Color.w = decalColor.w * Ambient.w *IN.Color.a;
  19.       }
  20.  
  21.